forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cbieneman/rewrite out params new #4
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change rewrites `out` and `inout` parameters to be implemented on the AST. The parameter copying behavior is modeled on the AST and generated through codegen. Instead of using the previously existing infrastructure for generating HLSL's copy-in/copy-out semantaics, this change generates temporaries based on the AST, uses AST-based analysis for optimziation, and uses the Objective-C indirect writeback support for copy-out.
'cbieneman/rewrite-out-params' on '617b5097828'.
'cbieneman/rewrite-out-params' on '617b5097828'.
'cbieneman/rewrite-out-params' on '617b5097828'.
'cbieneman/rewrite-out-params' on '617b5097828'.
'cbieneman/rewrite-out-params' on '4cf0f6c6504'.
I need to clean up the lvalue bindings in CGF, but otherwise this is going in the right direction.
SrcLV is Base with its casts stripped, but we only initialize it if we have a writeback cast sequence, otherwise we can just use Base.
This handles SrcLV for non-simple values where the address might not be available.
This change simplifies the casting chain for HLSL C-style casts that are either derived to base conversions or casting an object to itself. In both cases HLSL defines returning lvalues. This change collapses the cast chains down. Before this change all the CStyleCastExprs were genreated as `NoOp` casts with `ImplicitCastExpr` cast chains leading up to them. tools/clang/test/HLSLFileCheck/hlsl/classes/derived-to-base-casting.hlsl
This should all be done at the AST level
Under the MSVC ABI arguments are emitted right to left, but writebacks need to be emitted left to right for HLSL. This is probably a case that we need to look into more.
If we have an unsized array we can't generate a temporary for it. That makes unsized arrays as function parameters an odd special case that we should fix.
This reverts commit 93635eb.
The old test verified incorrect debug info based on incorrect code generation. This test verifies correct debug info. ../tools/clang/test/HLSLFileCheck/dxil/debug/out_args.hlsl
This reverts commit 3307009.
../lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Watch the world burn... yay!